package com.app.repository.impl;

import com.app.model.main.MainpageVisitRecord;
import com.app.repository.interfaces.MainpageVisitRecordMapper;
import com.app.support.dao.MybatisDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * Created by Lichaojie on 2017/7/17. It's a beautiful day.
 */
@Repository
public class MainpageVisitRecordMapperImpl implements MainpageVisitRecordMapper {

    final String namespace = "com.app.dao.main.MainpageVisitRecordMapper";

    @Autowired
    private MybatisDao mybatisDao;

    @Override
    public int deleteByPrimaryKey(Long id){
        return mybatisDao.delete(namespace,".deleteByPrimaryKey",id);
    }

    @Override
    public int insert(MainpageVisitRecord record){
        return mybatisDao.insert(namespace,".insert",record);
    }

    @Override
    public int insertSelective(MainpageVisitRecord record){
        return mybatisDao.insert(namespace,".insertSelective",record);
    }

    @Override
    public MainpageVisitRecord selectByPrimaryKey(Long id){
        return mybatisDao.get(namespace,".selectByPrimaryKey",id);
    }

    @Override
    public int updateByPrimaryKeySelective(MainpageVisitRecord record){
        return mybatisDao.update(namespace,".updateByPrimaryKeySelective",record);
    }

    @Override
    public int updateByPrimaryKey(MainpageVisitRecord record){
        return mybatisDao.update(namespace,".updateByPrimaryKey",record);
    }
}
